3.9.12 \(\int \frac {(f+g x)^n (a+2 c d x+c e x^2)}{(d+e x)^4} \, dx\) [812]

Optimal. Leaf size=197 \[ -\frac {\left (a-\frac {c d^2}{e}\right ) (f+g x)^{1+n}}{3 (e f-d g) (d+e x)^3}-\frac {\left (c d^2-a e\right ) g (2-n) (f+g x)^{1+n}}{6 e (e f-d g)^2 (d+e x)^2}+\frac {g \left (a e g^2 \left (2-3 n+n^2\right )+c \left (6 e^2 f^2-12 d e f g+d^2 g^2 \left (4+3 n-n^2\right )\right )\right ) (f+g x)^{1+n} \, _2F_1\left (2,1+n;2+n;\frac {e (f+g x)}{e f-d g}\right )}{6 e (e f-d g)^4 (1+n)} \]

[Out]

-1/3*(a-c*d^2/e)*(g*x+f)^(1+n)/(-d*g+e*f)/(e*x+d)^3-1/6*(c*d^2-a*e)*g*(2-n)*(g*x+f)^(1+n)/e/(-d*g+e*f)^2/(e*x+
d)^2+1/6*g*(a*e*g^2*(n^2-3*n+2)+c*(6*e^2*f^2-12*d*e*f*g+d^2*g^2*(-n^2+3*n+4)))*(g*x+f)^(1+n)*hypergeom([2, 1+n
],[2+n],e*(g*x+f)/(-d*g+e*f))/e/(-d*g+e*f)^4/(1+n)

________________________________________________________________________________________

Rubi [A]
time = 0.15, antiderivative size = 197, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.107, Rules used = {963, 79, 70} \begin {gather*} \frac {g (f+g x)^{n+1} \left (a e g^2 \left (n^2-3 n+2\right )+c \left (d^2 g^2 \left (-n^2+3 n+4\right )-12 d e f g+6 e^2 f^2\right )\right ) \, _2F_1\left (2,n+1;n+2;\frac {e (f+g x)}{e f-d g}\right )}{6 e (n+1) (e f-d g)^4}-\frac {g (2-n) \left (c d^2-a e\right ) (f+g x)^{n+1}}{6 e (d+e x)^2 (e f-d g)^2}-\frac {\left (a-\frac {c d^2}{e}\right ) (f+g x)^{n+1}}{3 (d+e x)^3 (e f-d g)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((f + g*x)^n*(a + 2*c*d*x + c*e*x^2))/(d + e*x)^4,x]

[Out]

-1/3*((a - (c*d^2)/e)*(f + g*x)^(1 + n))/((e*f - d*g)*(d + e*x)^3) - ((c*d^2 - a*e)*g*(2 - n)*(f + g*x)^(1 + n
))/(6*e*(e*f - d*g)^2*(d + e*x)^2) + (g*(a*e*g^2*(2 - 3*n + n^2) + c*(6*e^2*f^2 - 12*d*e*f*g + d^2*g^2*(4 + 3*
n - n^2)))*(f + g*x)^(1 + n)*Hypergeometric2F1[2, 1 + n, 2 + n, (e*(f + g*x))/(e*f - d*g)])/(6*e*(e*f - d*g)^4
*(1 + n))

Rule 70

Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(b*c - a*d)^n*((a + b*x)^(m + 1)/(b^(
n + 1)*(m + 1)))*Hypergeometric2F1[-n, m + 1, m + 2, (-d)*((a + b*x)/(b*c - a*d))], x] /; FreeQ[{a, b, c, d, m
}, x] && NeQ[b*c - a*d, 0] &&  !IntegerQ[m] && IntegerQ[n]

Rule 79

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(-(b*e - a*f
))*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(f*(p + 1)*(c*f - d*e))), x] - Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1
) + c*f*(p + 1)))/(f*(p + 1)*(c*f - d*e)), Int[(c + d*x)^n*(e + f*x)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e,
f, n}, x] && LtQ[p, -1] && ( !LtQ[n, -1] || IntegerQ[p] ||  !(IntegerQ[n] ||  !(EqQ[e, 0] ||  !(EqQ[c, 0] || L
tQ[p, n]))))

Rule 963

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :
> With[{Qx = PolynomialQuotient[(a + b*x + c*x^2)^p, d + e*x, x], R = PolynomialRemainder[(a + b*x + c*x^2)^p,
 d + e*x, x]}, Simp[R*(d + e*x)^(m + 1)*((f + g*x)^(n + 1)/((m + 1)*(e*f - d*g))), x] + Dist[1/((m + 1)*(e*f -
 d*g)), Int[(d + e*x)^(m + 1)*(f + g*x)^n*ExpandToSum[(m + 1)*(e*f - d*g)*Qx - g*R*(m + n + 2), x], x], x]] /;
 FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0]
&& IGtQ[p, 0] && LtQ[m, -1]

Rubi steps

\begin {align*} \int \frac {(f+g x)^n \left (a+2 c d x+c e x^2\right )}{(d+e x)^4} \, dx &=-\frac {\left (a-\frac {c d^2}{e}\right ) (f+g x)^{1+n}}{3 (e f-d g) (d+e x)^3}-\frac {\int \frac {(f+g x)^n \left (a g (2-n)-\frac {c d (3 e f-d g (1+n))}{e}-3 c (e f-d g) x\right )}{(d+e x)^3} \, dx}{3 (e f-d g)}\\ &=-\frac {\left (a-\frac {c d^2}{e}\right ) (f+g x)^{1+n}}{3 (e f-d g) (d+e x)^3}-\frac {\left (c d^2-a e\right ) g (2-n) (f+g x)^{1+n}}{6 e (e f-d g)^2 (d+e x)^2}+\frac {\left (a e g^2 \left (2-3 n+n^2\right )+c \left (6 e^2 f^2-12 d e f g+d^2 g^2 \left (4+3 n-n^2\right )\right )\right ) \int \frac {(f+g x)^n}{(d+e x)^2} \, dx}{6 e (e f-d g)^2}\\ &=-\frac {\left (a-\frac {c d^2}{e}\right ) (f+g x)^{1+n}}{3 (e f-d g) (d+e x)^3}-\frac {\left (c d^2-a e\right ) g (2-n) (f+g x)^{1+n}}{6 e (e f-d g)^2 (d+e x)^2}+\frac {g \left (a e g^2 \left (2-3 n+n^2\right )+c \left (6 e^2 f^2-12 d e f g+d^2 g^2 \left (4+3 n-n^2\right )\right )\right ) (f+g x)^{1+n} \, _2F_1\left (2,1+n;2+n;\frac {e (f+g x)}{e f-d g}\right )}{6 e (e f-d g)^4 (1+n)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [F]
time = 0.25, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {(f+g x)^n \left (a+2 c d x+c e x^2\right )}{(d+e x)^4} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

Integrate[((f + g*x)^n*(a + 2*c*d*x + c*e*x^2))/(d + e*x)^4,x]

[Out]

Integrate[((f + g*x)^n*(a + 2*c*d*x + c*e*x^2))/(d + e*x)^4, x]

________________________________________________________________________________________

Maple [F]
time = 0.05, size = 0, normalized size = 0.00 \[\int \frac {\left (g x +f \right )^{n} \left (c e \,x^{2}+2 c d x +a \right )}{\left (e x +d \right )^{4}}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g*x+f)^n*(c*e*x^2+2*c*d*x+a)/(e*x+d)^4,x)

[Out]

int((g*x+f)^n*(c*e*x^2+2*c*d*x+a)/(e*x+d)^4,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)^n*(c*e*x^2+2*c*d*x+a)/(e*x+d)^4,x, algorithm="maxima")

[Out]

integrate((c*x^2*e + 2*c*d*x + a)*(g*x + f)^n/(x*e + d)^4, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)^n*(c*e*x^2+2*c*d*x+a)/(e*x+d)^4,x, algorithm="fricas")

[Out]

integral((c*x^2*e + 2*c*d*x + a)*(g*x + f)^n/(x^4*e^4 + 4*d*x^3*e^3 + 6*d^2*x^2*e^2 + 4*d^3*x*e + d^4), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (f + g x\right )^{n} \left (a + 2 c d x + c e x^{2}\right )}{\left (d + e x\right )^{4}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)**n*(c*e*x**2+2*c*d*x+a)/(e*x+d)**4,x)

[Out]

Integral((f + g*x)**n*(a + 2*c*d*x + c*e*x**2)/(d + e*x)**4, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)^n*(c*e*x^2+2*c*d*x+a)/(e*x+d)^4,x, algorithm="giac")

[Out]

integrate((c*x^2*e + 2*c*d*x + a)*(g*x + f)^n/(x*e + d)^4, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (f+g\,x\right )}^n\,\left (c\,e\,x^2+2\,c\,d\,x+a\right )}{{\left (d+e\,x\right )}^4} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((f + g*x)^n*(a + 2*c*d*x + c*e*x^2))/(d + e*x)^4,x)

[Out]

int(((f + g*x)^n*(a + 2*c*d*x + c*e*x^2))/(d + e*x)^4, x)

________________________________________________________________________________________